#include<stdio.h>
int n;

int main()
{
    scanf("%d", &n);
    double sum = 0;
    int cnt = 0, max = -0x3f3f3f3f, min = 0x3f3f3f3f;
    while (n--)
    {
        int tmp; scanf("%d", &tmp);
        cnt++;
        sum += tmp;
        max = (max > tmp) ? max : tmp;
        min = (min < tmp) ? min : tmp;
    }
    printf("max=%d\nmin=%d\nsum=%d\naverage=%.2lf", max, min, (int)sum, sum / cnt);
    return 0;
}